<template>
  <el-dialog v-dialogDrag v-if="popenevTVisible" title="办文跟踪" :close-on-click-modal="false" :before-close="handleCancel" :visible.sync="popenevTVisible" width="1100px">
    <FollowOffice ref="followOffice" :modulename="modulename" :formtype="formtype" :cbPath="cbPath"></FollowOffice>
  </el-dialog>
</template>

<script>
import FollowOffice from "../FollowOffice.vue";
export default {
  components: { FollowOffice },
  data()
  {
    return {
      //是否显示弹窗
      popenevTVisible: true,
      //催办地址
      cbPath: null,
      //表单类型
      formtype: null,
      //模块名称
      modulename: null,
    };
  },
  methods: {
    showModal(data)
    {
      this.cbPath = data.cbPath || null;
      this.formtype = data.formtype || null;
      this.modulename = data.modulename || null;
      this.$nextTick(() =>
      {
        // 获取办文跟踪数据
        this.$refs.followOffice.getTableData(data);
      })
    },
    handleCancel()
    {
      this.destroyElement();
    },
    /**
     * cs 2022-4-8
     * 销毁组件
     */
    destroyElement()
    {
      this.popenevTVisible = false;
    },
  },
};
</script>